Skip to content

[3.14] gh-160549: Fix crash when freeing a busy multi-threaded ZstdCompressor (GH-160550) - #160638

Merged
gpshead merged 2 commits into
python:3.14from
miss-islington:backport-23a5ba1-3.14
Oct 25, 2026
Merged

gpshead merged 2 commits into
python:3.14from
miss-islington:backport-23a5ba1-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

ZSTD_freeCCtx() frees a dictionary loaded with ZSTD_CCtx_loadDictionary()
before it stops the worker threads. Make libzstd wait for unfinished
jobs before freeing the compression context of a ZstdCompressor that
uses worker threads and a ZstdDict.

Works around facebook/zstd#4862
(cherry picked from commit 23a5ba1)

Co-authored-by: Gregory P. Smith 68491+gpshead@users.noreply.github.com

…pressor (pythonGH-160550)

ZSTD_freeCCtx() frees a dictionary loaded with ZSTD_CCtx_loadDictionary()
before it stops the worker threads.  Make libzstd wait for unfinished
jobs before freeing the compression context of a ZstdCompressor that
uses worker threads and a ZstdDict.

Works around facebook/zstd#4862
(cherry picked from commit 23a5ba1)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
@gpshead
gpshead merged commit 27703ce into python:3.14 Oct 25, 2026
49 checks passed
@miss-islington
miss-islington deleted the backport-23a5ba1-3.14 branch October 25, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants